package com.chunxiadong.service.impl;

import com.chunxiadong.entity.Message;
import com.chunxiadong.mapper.MessageMapper;
import com.chunxiadong.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @auther QiuShangcheng
 * @create 2021/6/10
 */
@Service
public class MessageServiceImpl implements MessageService {
    @Autowired
  MessageMapper messageMapper;

    @Transactional
    @Override
    public int addMessage(Message message) {
        return messageMapper.addMessage(message);
    }

    @Transactional
    @Override
    public List<Message> getAllMessage() {
        return messageMapper.getAllMessage();
    }
}
